using UnityEngine;
using System.Collections;

public class FalseCollison : MonoBehaviour {
	
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
		if(Cabin.IsVisible==1){
			collider.enabled=true;
			
		}else if (Cabin.IsVisible==0){
			collider.enabled=false;
				
		}
		
	
	}
	void OnCollisionEnter(Collision collision){	
	
		if(collision.transform.tag=="bomb"){
		Cabin.IsVisible=0;
		Cabin.NextTime = WheelRotation.CouterSecond +5;
		transform.parent.collider.enabled=false;
		collider.enabled=false;
		}
		
	}

}
